<script setup lang='ts'>
import { useCounterStore } from '@/stores/counter';

const stor = useCounterStore()
</script>

<template>
    <div style="width: 200px; height: 150px; border: 5px solid plum;">
        组件二
        <div>值:{{ stor.count }}</div>
        <div>二倍:{{ stor.doubleCount }}</div>
        <button @click="stor.add">++</button>
        <button @click="stor.cut">--</button>
    </div>
</template>

<style scoped></style>